package com.cqq.auth.service;

import java.util.List;

import com.cqq.auth.service.bean.UserGroupBean;
import com.cqq.auth.service.bean.UserGroupQueryBean;
import com.cqq.auth.service.exception.UserGroupServiceException;
import com.cqq.common.core.bean.PageInfoBean;

/**
 * <h3>用户组服务接口</h3>
 * 
 * @author xijq
 * @version 1.0.0
 * 
 */
public interface UserGroupService {

	/**
	 * <h3>添加用户组</h3>
	 * 
	 * @param group UserGroupBean
	 * 
	 * @throws UserGroupServiceException
	 */
	public void addUserGroup(UserGroupBean group) throws UserGroupServiceException;

	/**
	 * <h3>更新用户组</h3>
	 * 
	 * @param group UserGroupBean
	 * 
	 * @throws UserGroupServiceException
	 */
	public void updateUserGroup(UserGroupBean group) throws UserGroupServiceException;

	/**
	 * <h3>删除用户组</h3>
	 * 
	 * @param id 用户组ID
	 * 
	 * @throws UserGroupServiceException
	 */
	public void deleteUserGroup(Integer id) throws UserGroupServiceException;

	/**
	 * <h3>查询用户组信息</h3>
	 * 
	 * @param id 用户组ID
	 * 
	 * @return UserGroupBean
	 * 
	 */
	public UserGroupBean findUserGroup(Integer id);
	
	/**
	 * <h3>查询所有用户组列表</h3>
	 * 
	 * @return UserGroupBean List
	 * 
	 */
	public List<UserGroupBean> listAllUserGroup();
	
	
	/**
	 * <h3>分页查询所有用户组列表</h3>
	 * @param queryBean
	 * @return
	 */
	public PageInfoBean<UserGroupBean> queryUserGroupByPage(UserGroupQueryBean queryBean);
	
	/**
	 * <h3>设置用户组拥有的角色</h3>
	 * 
	 * @param userId 用户ID
	 * @param roleIds 角色ID数组
	 * 
	 */
	public void updateUserGroupRoles(Integer userGroupId, Integer[] roleIds)throws UserGroupServiceException;
	
	
	/**
	 * <h3>根据用户ID查询用户组列表</h3>
	 * 
	 * @return UserGroupBean List
	 * 
	 */
	public List<UserGroupBean> listUserGroupByUserId(Integer userId);
	
	
}
